package cn.edu.hyit.zhao.service.impl;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import cn.edu.hyit.zhao.dao.IRecordDAO;
import cn.edu.hyit.zhao.entity.Record;
import cn.edu.hyit.zhao.service.IRecordService;

@Service
@Scope(value = "singleton")
public class RecordServiceImpl implements IRecordService {

    @Autowired
    private IRecordDAO recordDao;

    @Override
    public List<Record> queryRecordListByShopId(Integer shopId) {
	return this.recordDao.selectListByShopIdRecent10(shopId);
    }

    @Override
    public List<Record> queryRecordListByStartEndTime(Timestamp start, Timestamp end) {
	return this.recordDao.selectListByBetweenTime(start, end);
    }

}
